Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: select first value after search #83

Merged
merged 2 commits into from
Jul 6, 2024

Conversation

deronek
Copy link
Contributor

@deronek deronek commented Jul 3, 2024

#17 and 8f8fa9f added code so that first value is selected after search is executed (fixed #16). However, though internal state was updated, it was not propagated to onValueChange and exposed value.

You can easily notice it in the Framer example from the website:

  1. Search for any component in the input.
  2. Notice that the selected component on the right side does not change.

This PR fixes this, though since the state management in this library is pretty complex, please double check that it won't break anything.

Copy link

changeset-bot bot commented Jul 3, 2024

🦋 Changeset detected

Latest commit: d2137f9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
cmdk-sv Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jul 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cmdk-sv ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 3, 2024 4:21pm

Copy link
Owner

@huntabyte huntabyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@huntabyte huntabyte merged commit 0529aaf into huntabyte:main Jul 6, 2024
4 checks passed
@deronek deronek deleted the feature/select-after-search branch July 8, 2024 09:14
@github-actions github-actions bot mentioned this pull request Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Doesn't auto focus/highlight the best match
2 participants